<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>物业管理软件</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
	<meta name="author" content="Muhammad Usman">

	<#include "*/pubcss.ftl">
	<script src="${base}/script/pagination.js"></script>
		
</head>

<body>
	<#include "*/top.ftl">
	<!-- topbar ends -->
	<div class="container-fluid">
		<div class="row-fluid">
				
			<#include "*/left.ftl">
			<div id="content" class="span10">
			<!-- content starts -->
			<div>
				<ul class="breadcrumb">
					<li>
						<a href="#">基础资料</a> <span class="divider">/</span>
					</li>
					<li>
						<a href="#">小区资料</a>
					</li>
				</ul>
			</div>
		    <div class="row-fluid sortable">
				<div class="box span12">
					<div class="box-header well">
						<h2><i class="icon-edit"></i>查询条件</h2>
					</div>
					<div class="box-content">
						<form class="form-horizontal">
						  <fieldset>
							<div class="control-group">
								<label class="control-label" for="focusedInput">小区名称</label>
								<div class="controls">
								  <input class="input-xlarge focused" id="cname" name="community.cname" type="text" value="${(community.cname)?if_exists}">
								   <button type="button" class="btn btn-primary" onclick="javascript:load('find','../base/query_Community.action','${(rownum)?if_exists}','${(currentpage)?if_exists}','${(pageSize)?if_exists}',['cname']);">查询</button>
								</div>
							</div>
						  </fieldset>
						</form>   

					</div>
				</div><!--/span-->

			</div><!--/row-->
		    <div class="row-fluid sortable">
			    <button type="submit" class="btn btn-primary" onclick="window.location.assign('../base/addCommunity.action')">新增</button>
		    </div>
			<div class="row-fluid sortable">		
				<div class="box span12">
					<div class="box-header well" data-original-title>
						<h2><i class="icon-user"></i>小区信息</h2>
					</div>
					<div class="box-content">
						<table class="table table-bordered table-striped table-condensed">
						  <thead>
							  <tr>
							      <th>序号</th>
								  <th>小区名称</th>
								  <th>小区地址</th>
								  <th>联系人</th>
								  <th>联系电话</th>
								  <th>状态</th>
								  <th>操作</th>
							  </tr>
						  </thead>   
						  <tbody>
						    <#assign index=1>
						    <#list (communitys)?if_exists as community>
							<tr>
							    <td class="center">${(index)?if_exists}</td>
								<td class="center">${(community.cname)?if_exists}</td>
								<td class="center">${(community.caddr)?if_exists}</td>
								<td class="center">${(community.person)?if_exists}</td>
								<td class="center">${(community.tel)?if_exists}</td>
								<td class="center">
									<#if ((community.state)?if_exists)=='0'>
									  <span class="label label-success">正常</span>
								    <#else>
								      <span class="label label-error">禁用</span>
								    </#if>
								</td>
								<td class="center">
									<a class="btn btn-success" href="#">
										<i class="icon-zoom-in icon-white"></i>  
										查看                                            
									</a>
									<a class="btn btn-info" href="../base/load_Community.action?community.cid=${(community.cid)?if_exists}">
										<i class="icon-edit icon-white"></i>  
										修改                                            
									</a>
									<a class="btn btn-danger" href="javascript:remove('${(community.cid)?if_exists}');">
										<i class="icon-trash icon-white"></i> 
										删除
									</a>
									<a class="btn btn-warning" href="../base/loadHouse_Community.action?community.cid=${(community.cid)?if_exists}">
										<i class="icon-edit icon-white"></i> 
										套户资料
									</a>
								</td>
							</tr>
							<#assign index=index+1>
							</#list>
						  </tbody>
					  </table>
					  <div class="pagination pagination-centered">
						  <ul>
							<li><a href="javascript:load('first','../base/query_Community.action','${(rownum)?if_exists}','${(currentpage)?if_exists}','${(pageSize)?if_exists}',['name']);">首页</a></li>
							<li>
							  <a href="javascript:load('forward','../base/query_Community.action','${(rownum)?if_exists}','${(currentpage)?if_exists}','${(pageSize)?if_exists}',['name']);">上一页</a>
							</li>
							<li><a href="javascript:load('back','../base/query_Community.action','${(rownum)?if_exists}','${(currentpage)?if_exists}','${(pageSize)?if_exists}',['name']);">下一页</a></li>
							<li><a href="javascript:load('last','../base/query_Community.action','${(rownum)?if_exists}','${(currentpage)?if_exists}','${(pageSize)?if_exists}',['name']);">尾页</a></li>
						  </ul>
					  </div>  
					</div>
				</div><!--/span-->
			
			</div><!--/row-->
		  
       
			<!-- content ends -->
			</div><!--/#content.span10-->
		</div><!--/fluid-row-->

		
	</div><!--/.fluid-container-->
    <#include "*/infotemplate/alert.ftl">
    <#include "*/infotemplate/saveinfo.ftl">
    <#include "*/pubjs.ftl">
	<script src='${base}/script/base/community_manager.js'></script>	
</body>
</html>
